<!--
    @name 维修工单总部-工单详情
    @author haoyang.ding
    @date 2021-01-25
-->
<template>
  <section>
    <!--  车辆信息  -->
    <QueryComponent
      :dynamic-inputs="formInputs_1"
      title="车辆信息"
      :form-field="formField_1"
    />
    <!--  派工信息  -->
    <QueryComponent
      ref="multipleTable1"
      :form-field="formField_2"
      :dynamic-inputs="formInputs_2"
      title="派工信息"
    />
    <!--  车主信息  -->
    <QueryComponent
      ref="multipleTable2"
      :form-field="formField_3"
      :dynamic-inputs="formInputs_3"
      title="车主信息"
    />
    <!--  三个文本域  -->
    <div class="textarea-header">
      <div class="filter-container filter-title textarea-header__item">
        客户描述
      </div>
      <div class="filter-container filter-title textarea-header__item">
        上次建议维修项目
      </div>
      <div class="filter-container filter-title textarea-header__item">
        本次建议维修项目
      </div>
    </div>
    <OneTableTemplate
      ref="multipleTable3"
      :dynamic-components="textareaInputs"
      :dynamic-form-fields="formField_4"
    />
    <!--  服务活动  -->
    <QueryComponent
      ref="table_1"
      :dynamic-tables="tableHeader_1"
      :is-show-pagination="false"
      :is-show-select="false"
      title="服务活动"
      :is-show="false"
    />
    <!--  保养套餐/商城精品  -->
    <QueryComponent
      ref="table_2"
      :dynamic-tables="tableHeader_2"
      :is-show-pagination="false"
      title="保养套餐/商城精品"
      :is-show="false"
    />
    <!--  维修信息  -->
    <div class="filter-container filter-title">维修信息</div>
    <!--  维修信息 表格一  -->
    <div class="mainten-table__line">
      <span class="mainten-table__line-info">维修工时</span>
    </div>
    <OneTableTemplate
      ref="table_3_1"
      :dynamic-table-cols="tableHeader_3_1"
      :is-show-pagination="false"
      :dynamic-is-show-select="false"
      :dynamic-table-defult-height="tableHeight"
    />
    <!--  维修信息 表格二  -->
    <div class="mainten-table__line">
      <span class="mainten-table__line-info">维修备件</span>
    </div>
    <OneTableTemplate
      ref="table_3_2"
      :dynamic-table-cols="tableHeader_3_2"
      :is-show-pagination="false"
      :dynamic-is-show-select="false"
      :dynamic-table-defult-height="tableHeight"
    />

    <!--  维修信息 表格三  -->
    <div class="mainten-table__line">
      <span class="mainten-table__line-info">其他项目</span>
    </div>
    <OneTableTemplate
      ref="table_3_3"
      :dynamic-table-cols="tableHeader_3_3"
      :is-show-pagination="false"
      :dynamic-is-show-select="false"
      :dynamic-table-defult-height="tableHeight"
    />
    <!--  费用信息  -->
    <QueryComponent
      ref="table_4"
      :dynamic-inputs="formInputs_4"
      :form-field="formField_5"
      title="费用信息"
    />
  </section>
</template>

<script>
import OneTableTemplate from '@/components/templates/oneTable'
import { oneTableWithViewTemplateMixins } from '@/components/mixins/oneTableWithViewTemplateMixins'
import QueryComponent from '@/components/QueryComponent/QueryComponent'
import request from '@/utils/request.js'
import { orgApis } from '@/api/caseManagementQuery'

export default {
  name: 'OrderDetails',
  components: {
    OneTableTemplate,
    QueryComponent
  },

  mixins: [oneTableWithViewTemplateMixins],

  data() {
    return {
      tableHeight: 345,
      warehouseOptions: [],
      cacheData: {},
      dataForForm: {},

      otherProjectsPopupsState: '',
      rowData: {},
      batteryData: {},
      appointmentTime: {},

      spareNum: 0,
      otherNum: 0,
      carInfo: {},
      formList: {},
      otherRowData: {},
      serviceDlrId: '',

      // 车辆信息
      formInputs_1: [
        {
          compKey: 'key1',
          labelName: 'VIN码：',
          codeField: 'vin',
          textField: 'vin',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key0',
          labelName: '车牌号：',
          codeField: 'carLicense',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true,
          span: 6
        },
        {
          compKey: 'key2',
          labelName: '品牌：',
          codeField: 'carBrandCn',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key3',
          labelName: '车系：',
          codeField: 'carSeriesCn',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key4',
          labelName: '车型编码：',
          codeField: 'carConfigCode',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key5',
          labelName: '车型名称：',
          codeField: 'carConfigCn',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key6',
          labelName: '颜色：',
          codeField: 'carColorName',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key7',
          labelName: '车辆用途：',
          codeField: 'buyCaruseName',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key8',
          labelName: '行驶里程：',
          codeField: 'mileage',
          isMul: false,
          validrule: {
            isformat: /^[+]{0,1}(\d+)$/
          },
          disabled: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true
        },
        {
          compKey: 'key9',
          labelName: '实际里程：',
          codeField: 'realMileage',
          isMul: false,
          validrule: {
            isformat: /^[+]{0,1}(\d+)$/
          },
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          disabled: true,
          isMust: true
        },
        {
          compKey: 'key10',
          labelName: '购车日期：',
          codeField: 'buyDate',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key11',
          labelName: '交车日期：',
          codeField: 'deliveryDate',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        }
      ],
      formField_1: {
        vin: '',
        isOtherCar: '',
        carLicense: '',
        VIN: '',
        carBrandCn: '',
        carSeriesCn: '',
        carConfigCode: '',
        carConfigCn: '',
        carColorName: '',
        buyCaruseName: '',
        mileage: '',
        realMileage: '',
        buyDate: '',
        deliveryDate: ''
      },

      // 派工信息
      formInputs_2: [
        {
          compKey: 'key0',
          labelName: '派工单号：',
          codeField: 'repairOrderCode',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key1',
          labelName: '服务顾问：',
          codeField: 'empName',
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key2',
          labelName: '送修人：',
          codeField: 'repairMan',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key3',
          labelName: '送修人电话：',
          codeField: 'repairTel',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          disabled: true,
          isMust: true
        },
        {
          compKey: 'key4',
          labelName: '到店时间：',
          codeField: 'repairTime',
          isMul: false,
          isRequire: true,
          component: () => import('@/components/org/datePicker/dateTimePick'),
          dateType: 'datetime',
          dateFormat: 'yyyy-MM-dd HH:mm:ss',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key5',
          labelName: '预计交车时间：',
          codeField: 'preGetDate',
          isRequire: true,
          isMul: false,
          component: () => import('@/components/org/datePicker/dateTimePick'),
          dateType: 'datetime',
          dateFormat: 'yyyy-MM-dd HH:mm:ss',
          disabled: true,
          isMust: true
        },
        {
          compKey: 'key6',
          labelName: '工单状态：',
          codeField: 'repairOrderStatusName',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key7',
          labelName: '委外门店：',
          codeField: 'dlrCode',
          isMul: false,
          component: () => import('@/components/org/commonSelect'),
          customObj: {
            api: orgApis.outDlrList,
            selectType: '1',
            defOptionFields: ['dlrCode', 'dlrName']
          },
          isMust: true,
          type: 'dropdownList',
          disabled: true
        },
        {
          compKey: 'key8',
          labelName: '救援里程：',
          codeField: 'rescueMileage',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true,
          isRequire: false
        },
        {
          compKey: 'key9',
          labelName: '服务类型：',
          codeField: 'billType',
          component: () => import('@/components/org/commonSelect'),
          customObj: {
            api: orgApis.selectBillType,
            selectType: '1',
            defOptionFields: ['billType', 'billTypeName']
          },
          isMust: true,
          type: 'dropdownList',
          disabled: true
        }
      ],
      formField_2: {
        repairOrderCode: '',
        empName: '',
        repairMan: '',
        repairTel: '',
        repairTime: '',
        preGetDate: '',
        repairOrderStatusName: '',
        repairOrderStatus: '',
        dlrCode: '',
        rescueMileage: '',
        billType: '',
        billTypeName: ''
      },

      // 车主信息
      formInputs_3: [
        {
          compKey: 'key0',
          labelName: '用户ID：',
          codeField: 'carCustId',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key1',
          labelName: '车主姓名：',
          codeField: 'custName',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key2',
          labelName: '车主电话：',
          codeField: 'phone',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key3',
          labelName: '车主性质：',
          codeField: 'custClassName',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key4',
          labelName: '证件号码：',
          codeField: 'credNo',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key5',
          labelName: '省份：',
          codeField: 'addrProvince',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key6',
          labelName: '城市：',
          codeField: 'addrCity',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key7',
          labelName: '区县：',
          codeField: 'addrCounty',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key8',
          labelName: '详细地址：',
          codeField: 'addrStreet',
          isMul: false,
          component: () => import('@/components/org/commonInput/textareaInput'),
          disabled: true,
          type: 'inputText',
          isMust: true,
          span: 18
        }
      ],
      formField_3: {
        carCustId: '',
        custName: '',
        phone: '',
        custClassCode: '',
        custClassName: '',
        credNo: '',
        addrProvince: '',
        addrCity: '',
        addrCounty: '',
        addrStreet: ''
      },

      // 客户描述
      textareaInputs: [
        {
          // 客户描述
          compKey: 'key0',
          codeField: 'csDesc',
          isMul: false,
          disabled: true,
          component: () => import('@/components/org/commonInput/textareaInput'),
          type: 'inputText',
          isMust: true,
          span: 8
        },
        {
          compKey: 'key1',
          codeField: 'scRecommendItem',
          isMul: false,
          component: () => import('@/components/org/commonInput/textareaInput'),
          disabled: true,
          type: 'inputText',
          isMust: true,
          span: 8
        },
        {
          compKey: 'key2',
          codeField: 'recommendItem',
          isMul: false,
          disabled: true,
          component: () => import('@/components/org/commonInput/textareaInput'),
          type: 'inputText',
          isMust: true,
          span: 8
        }
      ],
      formField_4: {
        csDesc: '',
        recommendItem: '',
        scRecommendItem: ''
      },

      tableHeader_1: [
        {
          prop: 'updateControlId',
          label: '并发控制ID',
          hidden: true,
          alwaysHidden: true
        },
        {
          label: '活动编号',
          prop: 'actionCode'
        },
        {
          label: '活动名称',
          prop: 'actionName'
        },
        {
          label: '活动类型',
          prop: 'actionTypeName'
        },
        {
          label: '开始日期',
          prop: 'beginDate'
        },
        {
          label: '结束日期',
          prop: 'endDate'
        }
      ],
      tableHeader_2: [
        {
          label: '订单号',
          prop: 'repairOrderId'
        },
        {
          label: '类别',
          prop: 'comboSaleType'
        },
        {
          label: '保养套餐/精品编码',
          prop: 'comboSaleCode'
        },
        {
          label: '保养套餐/精品名称',
          prop: 'comboSaleName'
        },
        {
          label: '使用次数/数量',
          prop: 'comboSaleCount'
        },
        {
          label: '有效日期',
          prop: 'endDate'
        },
        {
          label: '购车日期',
          prop: 'buyDate'
        }
      ],

      // 维修工时
      tableHeader_3_1:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          .length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          : [
            {
              label: '工时编码',
              prop: 'wiCode'
            },
            {
              label: '维修内容',
              prop: 'wiName'
            },
            {
              label: '维修类型',
              prop: 'retRepairTypeName'
            },
            {
              label: '维修类别',
              prop: 'repairTypeName'
            },
            {
              label: '付费性质',
              prop: 'payKindName'
            },
            {
              label: '工时数',
              prop: 'saleWorkQty'
            },
            {
              label: '工时单价',
              prop: 'wiPrice'
            },
            {
              label: '费用合计',
              prop: 'wiAmount'
            },
            {
              label: '维修班组',
              prop: 'groupName'
            },
            {
              label: '维修技师',
              prop: 'empName'
            },
            {
              label: '费用预估',
              prop: 'wiPreAmount'
            },
            {
              label: '套餐/精品编码',
              prop: 'servicePackageCode'
            },
            {
              label: '是否委外',
              prop: 'isEntrust'
            },
            {
              label: '备注',
              prop: 'note'
            }
          ],

      // 备件
      tableHeader_3_2: [
        {
          label: '备件编码',
          prop: 'partNo'
        },
        {
          label: '备件名称',
          prop: 'partName'
        },
        {
          label: '维修类型',
          prop: 'retRepairTypeName'
        },
        {
          label: '付费性质',
          prop: 'payKindName'
        },
        {
          label: '数量',
          prop: 'partQty'
        },
        {
          label: '已出库数量',
          prop: 'outQty'
        },
        {
          label: '可用数量',
          prop: 'usableStockQty'
        },
        {
          label: '单价',
          prop: 'partPrice'
        },
        {
          label: '费用合计',
          prop: 'partAmount'
        },
        {
          label: '费用预估',
          prop: 'prePartAmount'
        },
        {
          label: '套餐/精品编码',
          prop: 'comboSaleCode'
        },
        {
          label: '是否委外',
          prop: 'isAssign'
        },
        {
          label: '备注',
          prop: 'note'
        }
      ],

      tableHeader_3_3: [
        {
          label: '项目描述',
          prop: 'remark'
        },
        {
          label: '其他项目',
          prop: 'otherAmountType'
        },
        {
          label: '付费性质',
          prop: 'payKindName'
        },
        {
          label: '维修类型',
          prop: 'retRepairTypeName'
        },
        {
          label: '费用合计',
          prop: 'otherAmount'
        },
        {
          label: '套餐/精品编码',
          prop: 'servicePackageCode'
        }
      ],

      formInputs_4: [
        {
          compKey: 'key0',
          labelName: '索赔：',
          codeField: 'spTotal',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key1',
          labelName: '内部：',
          codeField: 'nbTotal',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key2',
          labelName: '保险：',
          codeField: 'bxTotal',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key3',
          labelName: '客户：',
          codeField: 'khTotal',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key4',
          labelName: '工时费：',
          codeField: 'wCoSts',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key5',
          labelName: '备件费：',
          codeField: 'pCoSts',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key6',
          labelName: '其他费用：',
          codeField: 'oCoSts',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        },
        {
          compKey: 'key7',
          labelName: '费用合计：',
          codeField: 'totals',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          disabled: true
        }
      ],

      formField_5: {
        spTotal: '',
        nbTotal: '',
        bxTotal: '',
        khTotal: '',
        wCoSts: '',
        pCoSts: '',
        oCoSts: '',
        totals: ''
      }
    }
  },

  // 进入当前存在activated()函数的页面时，一进入页面就触发；可用于初始化页面数据
  activated() {
    this.maintainAll()
    this.queryOrderInfo()
    this.maintenanceTime()
    this.repairPartList()
    this.repairOtherList()
  },
  methods: {
    /* -------------------------------------- 工单 -------------------------------------- */

    // 主查询-车辆信息--派工信息--车主信息--客户描述
    queryOrderInfo() {
      const that = this
      const queryObj = {
        type: 'mutation',
        apiConfig: orgApis.workOrderDetails,
        variables: {
          repairOrderCode: this.$route.params.repairOrderCode,
          repairOrderId: this.$route.params.repairOrderId
        }
      }
      var paramD = this.$getParams(queryObj)
      this.$requestAPI(paramD).then(response => {
        if (response.result === '1') {
          var res = response.rows
          // 车辆信息
          for (const i in that.formField_1) {
            that.formField_1[i] = response.rows[1][i]
          }
          // 上次维修项目建议
          request({
            url: '/mp/e3sh/aftersale/WorkOrderManagementService/lastTimeProposal.do',
            method: 'post',
            data: { vin: this.formField_1.vin }
          }).then((res) => {
            if (res.result === '1' && res.rows.length !== 0) {
              console.log(this.textareaInputs)
              this.formField_4.scRecommendItem = res.rows[0].scRecommendItem
            } else if (res.result === '1' && res.rows.length === 0) {
              this.formField_4.scRecommendItem = ''
            }
          })
          // 派工信息
          for (const i in that.formField_2) {
            that.formField_2[i] = response.rows[1][i]
            that.formField_2.empName = response.rows[1].empName
          }
          // 车主信息
          for (const i in that.formField_3) {
            that.formField_3[i] = response.rows[1][i]
          }
          // 客户描述
          for (const i in this.formField_4) {
            this.formField_4[i] = response.rows[1][i]
          }
          // 费用信息
          for (const i in this.formField_5) {
            this.formField_5[i] = response.rows[1][i]
          }
          this.formField_1.VIN = response.rows[1].vin
          this.formField_1.carLicense = response.rows[1].carLicense
          this.serviceDlrId = res[1].dlrId
          this.formList.ispick = res[1].ispick
          this.formList.isCarStore = res[1].isCarStore
          this.formList.isDelivery = res[1].isDelivery
          this.formList.isHelp = res[1].isHelp
          this.formList.isWait = res[1].isWait
          this.formList.isClean = res[1].isClean
          this.serviceActive(res[1].dlrId)
        }
      })
    },

    //
    /* -------------------------------------- 维修工时 -------------------------------------- */

    // 维修工时查询
    maintenanceTime() {
      request({
        url: '/mp/e3sh/aftersale/WorkOrderManagementService/maintenanceTimeList.do',
        method: 'post',
        data: {
          repairOrderId: this.$route.params.repairOrderId
        }
      }).then((res) => {
        res.rows.forEach((item) => {
          item.repairOrderStatusName = this.$route.params.repairOrderStatusName
        })
        this.$refs['table_3_1'].list = res.rows
      })
    },

    //
    /* -------------------------------------- 维修备件 -------------------------------------- */

    // 维修备件查询
    repairPartList() {
      request({
        url: '/mp/e3sh/aftersale/WorkOrderManagementService/repairPartList.do',
        method: 'post',
        data: {
          repairOrderId: this.$route.params.repairOrderId
        }
      }).then((res) => {
        res.rows.forEach((item) => {
          item.repairOrderStatusName = this.$route.params.repairOrderStatusName
        })
        this.$refs['table_3_2'].list = res.rows
      })
    },

    //
    /* -------------------------------------- 维修其他项目 -------------------------------------- */

    // 其他项目查询
    repairOtherList() {
      request({
        url: '/mp/e3sh/aftersale/WorkOrderManagementService/repairOtherList.do',
        method: 'post',
        data: {
          repairOrderId: this.$route.params.repairOrderId
        }
      }).then((res) => {
        res.rows.forEach((item) => {
          item.repairOrderStatusName = this.$route.params.repairOrderStatusName
        })
        this.$refs['table_3_3'].list = res.rows
        this.otherChooseArray = res.rows
      })
    },
    //
    /* -------------------------------------- 服务活动 表格 -------------------------------------- */

    // 服务活动查询
    serviceActive(value) {
      const info = {}
      info.dlrId = value
      const queryObj = {
        apiConfig: orgApis.sActivitiesList,
        variables: info
      }
      var paramD = this.$getParams(queryObj)
      this.$requestAPI(paramD).then(response => {
        // that.$refs['table_1'].list = response.rows;
        this.$refs.table_1.$children[0].list = response.rows
      })
    },

    //
    /* -------------------------------------- 保养套餐/商城精品  表格 -------------------------------------- */

    // 保养套餐/商城精品----查询
    maintainAll() {
      request({
        url: '/mp/e3sh/aftersale/WorkOrderManagementService/setMealList.do',
        method: 'post',
        data: {
          repairOrderId: this.$route.params.repairOrderId
        }
      }).then((res) => {
        this.$refs['table_2'].$children[0].list = res.rows
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.el-button  {
  margin-left: 10px;
}
/deep/.el-input-number--small .el-input__inner{
    padding-right: 0;

}
/deep/.el-input-number .el-input__inner {
  padding-left: 0;
}
/deep/.el-table .el-input--small .el-input__inner{
  height: 26px;
}

.btns-container {
  // position:fixed;
  // top: 40;
  width: 100%;
  height: 30px;
  padding: 0 20px;
  background-color: #fff;
  .el-button {
    float: right;
  }
}
.btns-container:last-child button {
  margin-left: 10px;
}
.checkbox-wrapper {
  width: 100%;
  padding: 0 10px;
  background-color: #fff;
  .el-checkbox {
    float: right;
    margin-top: 10px;
  }
}
.textarea-header {
  width: 100%;
  height: 30px;
  background-color: #fff;
  &__item {
    width: calc(100% / 3);
    float: left;
  }
}
.mainten-select {
  width: 100%;
  height: 30px;
  padding: 0 20px;
  background-color: #fff;
}
.mainten-table__line {
  width: 100%;
  height: 30px;
  padding: 0 20px;
  line-height: 30px;
  background-color: #fff;
  &-info {
    float: left;
  }
  &-btns {
    float: right;
  }
}
</style>
